package com.blog.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * Created by youpengfei on 15/2/9.
 */
@Entity
@Table(name = "draft")
public class Draft extends AbstractEntity {
    @Column(length = 45)
    private String title;
    @Column(columnDefinition = "TEXT NOT NULL")
    private String content;
    @Column(length = 45)
    private String author;
    @Column(columnDefinition = "TEXT NOT NULL")
    private String markdownContent;

    @Column
    @Version
    private Integer version;

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getMarkdownContent() {
        return markdownContent;
    }

    public void setMarkdownContent(String markdownContent) {
        this.markdownContent = markdownContent;
    }
}
